libostree/sepolicy: get rid of a g_setenv() call
authorLuca BRUNO <luca.bruno@coreos.com>
Tue, 11 Jan 2022 15:39:30 +0000 (15:39 +0000)
committerLuca BRUNO <luca.bruno@coreos.com>
Tue, 11 Jan 2022 15:56:13 +0000 (15:56 +0000)
commit840cd7ab2da3e9992a6b91ba312a702e3ba55e0d
treefd4cae3f4a90624a1eaba93542660a259612c0b0
parent7cc84819078aec6b9637b3ad29712ca3e2f8433e
libostree/sepolicy: get rid of a g_setenv() call

This removes a 'g_setenv()' call, which could potentially be unsafe
in a multi-thread context.
The current libselinux codebase does not seem to check for
`LIBSELINUX_DISABLE_PCRE_PRECOMPILED`, so I think this has no effects
nowadays.
Additionally, I could not find any reference to it in libselinux
git history, so I'm not sure if it ever played any role at all.

My current understanding is that this is coming from version
incompatibilities between an older libselinux in the build environment
and a newer policy (with precompiled regexs) in the target.
But from the ML discussion I found, I think it eventually got
solved in a different way, possibly by avoiding the policy binary
caches.

Refs:
 * https://www.spinics.net/lists/selinux/msg14822.html
 * https://github.com/ostreedev/ostree/pull/2513#discussion_r781042884
src/libostree/ostree-sepolicy.c